home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / wasm223.zip / MESSAGE1.ASM < prev    next >
Assembly Source File  |  1993-05-04  |  2KB  |  48 lines

  1. ;**************************************************;
  2. ; WASM Message Module, Standard Output             ;
  3. ; By Eric Tauck                                    ;
  4. ;                                                  ;
  5. ; Defines:                                         ;
  6. ;                                                  ;
  7. ;   MesPut   message to standard output            ;
  8. ;   MesPutL  message plus CR+LF to standard output ;
  9. ;**************************************************;
  10.  
  11.         jmps    _message1_end
  12.  
  13. ;========================================
  14. ; Display an ASCIIZ string.
  15. ;
  16. ; In: AX= string address.
  17.  
  18. MesPut  PROC    NEAR
  19.         mov     bx, ax
  20. _mgstd1 mov     dl, [bx]        ;load byte
  21.         or      dl, dl          ;check if done
  22.         jz      _mgstd2         ;exit loop if so
  23.         mov     ah, 2           ;display function
  24.         int     21H             ;execute
  25.         inc     bx              ;next character
  26.         jmps    _mgstd1         ;loop back
  27. _mgstd2 ret
  28.         ENDP
  29.  
  30. ;========================================
  31. ; Display an ASCIIZ string followed by a
  32. ; carriage return and linefeed.
  33. ;
  34. ; In: AX= string address.
  35.  
  36. MesPutL PROC    NEAR
  37.         call    MesPut          ;display string
  38.         mov     ah, 2           ;display function
  39.         mov     dl, 13          ;carriage return
  40.         int     21H             ;execute
  41.         mov     ah, 2           ;display function
  42.         mov     dl, 10          ;linefeed
  43.         int     21H             ;execute
  44.         ret
  45.         ENDP
  46.  
  47. _message1_end
  48.